home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-01 | 54.3 KB | 1,611 lines | [TEXT/MPS ] |
- /*
- File: BlockStorage.idl
-
- Contains: External interfaces to Block Storage Family
-
- Version: Technology: Copland
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- */
- #ifndef __BLOCKSTORAGE_IDL__
- #define __BLOCKSTORAGE_IDL__
-
- #include <somobj.idl>
- #include <somcls.idl>
-
- #ifndef __TYPES_IDL__
- #include <Types.idl>
- #endif
- #ifndef __MATH64_IDL__
- #include <Math64.idl>
- #endif
- #ifndef __ERRORS_IDL__
- #include <Errors.idl>
- #endif
- #ifndef __NAMEREGISTRY_IDL__
- #include <NameRegistry.idl>
- #endif
- #ifndef __IOMEMORYLISTS_IDL__
- #include <IOMemoryLists.idl>
- #endif
- #ifndef __IOITERATOR_IDL__
- #include <IOIterator.idl>
- #endif
-
- #ifdef __SOMIDL__
-
- #if FOR_SYSTEM8_PREEMPTIVE
- /*
- ******************************************************************************
- *******************************************************************************
- *******************************************************************************
-
- Block Storage Constants
-
- *******************************************************************************
- *******************************************************************************
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- Store property names
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- Container property names
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- StoreOpenOptions is the set of permissions available when making a Connection
- to a Store. These options can be OR'd together in any combination.
-
- *****************************************************************************
- */
- typedef UInt32 BSStoreOpenOptions;
-
- /*
- ******************************************************************************
-
- BSContainerOpenOptions is the set of permissions available when making a
- Connection to a Container. These options can be OR'd together in any combination.
-
- *****************************************************************************
- */
- typedef UInt32 BSContainerOpenOptions;
-
- /*
- ****************************************************************************
-
- Accessibility states
-
- Accessibility States indicate how accessible a Block Storage Container or
- Store is. There are four currently defined. Their absolute values
- are unimportant, but have been split across fairly large ranges to
- allow for future values to be inserted between them.
-
- kBSOnline and kBSOffline represent the two extremes of accessibility -
- nothing can be less accessible than kBSOffline (that is the state you
- send a Store to when you are about to delete it) and nothing can be
- more online than kBSOnline, which means you are fully, 100% available.
-
- ***************************************************************************
- */
- typedef UInt32 BSAccessibilityState;
-
- /*
- ****************************************************************************
-
- Component types
-
- ***************************************************************************
- */
- typedef UInt32 BSComponentType;
-
- /*
- ****************************************************************************
-
- Block List Seek specifiers
-
- ***************************************************************************
- */
- typedef UInt32 BSBlockListWhence;
-
- /*
- ****************************************************************************
-
- Selectors for BSStoreGetDeviceData - specifies which set of Stores to
- return
-
- ***************************************************************************
- */
- typedef UInt32 BSStoreGetSelector;
-
- /*
- ****************************************************************************
-
- Format specifiers - these are generic categories. There may be further
- distinctions within these categories for number of blocks, etc.
-
- ***************************************************************************
- */
- typedef OSType BSStoreFormatType;
-
- /* Maximum number of formats a Mapping plug-in can support */
- /*
- ****************************************************************************
- *****************************************************************************
- *****************************************************************************
-
- Block Storage Error codes
-
- *****************************************************************************
- *****************************************************************************
- ***************************************************************************
- */
- /*
- ****************************************************************************
-
- Basic error types
-
- ***************************************************************************
- */
- /*
- ****************************************************************************
-
- Block Storage Error ID
-
- ***************************************************************************
- */
- /*
- ****************************************************************************
-
- Block Storage Error Categories
-
- ***************************************************************************
- */
- /*
- ****************************************************************************
-
- Family Errors
-
- ***************************************************************************
- */
- /*
- ****************************************************************************
-
- Expert Errors
-
- ***************************************************************************
- */
- /*
- ****************************************************************************
-
- Mapping Plug-in Errors
-
- ***************************************************************************
- */
- /*
- ****************************************************************************
-
- Partitioning Plug-in Errors
-
- ***************************************************************************
- */
- /*
- ****************************************************************************
-
- Container Plug-in Errors
-
- ***************************************************************************
- */
- /*
- ****************************************************************************
-
- Block List Errors
-
- ***************************************************************************
- */
- /*
- ****************************************************************************
- *****************************************************************************
- *****************************************************************************
-
- Block Storage Types and Structures
-
- *****************************************************************************
- *****************************************************************************
- ***************************************************************************
- */
- /*
- ****************************************************************************
-
- Store and Container Persistent Identifiers
-
- ***************************************************************************
- */
- typedef OpaquePtr BSStoreID; /* Substituted OpaquePtr for array of char of size 12 */
-
- typedef OpaquePtr BSContainerID; /* Substituted OpaquePtr for array of char of size 12 */
-
- /*
- ****************************************************************************
-
- Connection ID's
-
- ***************************************************************************
- */
- typedef ObjectID BSContainerConnID;
-
- typedef ObjectID BSStoreConnID;
-
- /*
- ****************************************************************************
-
- Plug-in run-time references. References the plug-in in general, not
- a specific instance of it
-
- ***************************************************************************
- */
- typedef OpaquePtr BSMappingPlugInRef;
-
- typedef OpaquePtr BSPartitioningPlugInRef;
-
- typedef OpaquePtr BSContainerPlugInRef;
-
- /*
- ****************************************************************************
-
- Store and Container Run-Time References
-
- ***************************************************************************
- */
- typedef RegEntryRef BSStoreRef;
-
- typedef RegEntryRef BSContainerRef;
-
- /*
- ****************************************************************************
-
- Store and Container Navigation API types
-
- ***************************************************************************
- */
- typedef ObjectID BSStoreIteratorID;
-
- typedef ObjectID BSContainerIteratorID;
-
- typedef RegPropertyInstance BSStorePropertyInstance;
-
- typedef RegPropertyInstance BSContainerPropertyInstance;
-
- /*
- ****************************************************************************
-
- Device block descriptor types
-
- ***************************************************************************
- */
- typedef UInt64 BSByteCount;
-
- typedef OpaquePtr BSBlockListRef;
-
- typedef OpaquePtr BSBlockListDescriptorRef;
-
- /*
- ******************************************************************************
-
- BSBlockListDescriptorInfo - information about a Block List Descriptor
-
- *****************************************************************************
- */
- typedef SOMLargeStruct BSBlockListDescriptorInfo; /* Derived from a struct of 28 bytes in size */
-
- typedef OpaquePtr BSBlockListDescriptorInfoPtr; /* Substituted OpaquePtr for “BSBlockListDescriptorInfo*” */
-
- /*
- ****************************************************************************
-
- BSStoreFormatInfo
-
- ***************************************************************************
- */
- typedef ItemCount BSFormatIndex;
-
- typedef SOMLargeStruct BSStoreFormatInfo; /* Derived from a struct of 16 bytes in size */
-
- /*
- ****************************************************************************
-
- BSStoreInfo is used to return information about a Store
-
- ***************************************************************************
- */
- typedef SOMLargeStruct BSStoreInfo; /* Derived from a struct of 517 bytes in size */
-
- typedef OpaquePtr BSStoreInfoPtr; /* Substituted OpaquePtr for “BSStoreInfo*” */
-
- /*
- ****************************************************************************
-
- BSContainerInfo is used to return information about a Container
-
- ***************************************************************************
- */
- typedef SOMLargeStruct BSContainerInfo; /* Derived from a struct of 21 bytes in size */
-
- typedef OpaquePtr BSContainerInfoPtr; /* Substituted OpaquePtr for “BSContainerInfo*” */
-
- /*
- ****************************************************************************
-
- BSPartitionInfo is used to return information about a Partition
-
- ***************************************************************************
- */
- typedef SOMLargeStruct BSPartitionDescriptor; /* Derived from a struct of 325 bytes in size */
-
- typedef OpaquePtr BSPartitionDescriptorPtr; /* Substituted OpaquePtr for “BSPartitionDescriptor*” */
-
- /*
- ****************************************************************************
-
- BSStoreComponent describes a component of a Store. A component may
- be an external device or another Store.
-
- ***************************************************************************
- */
- typedef SOMLargeStruct BSStoreComponent; /* Derived from a struct of 369 bytes in size */
-
- typedef OpaquePtr BSStoreComponentPtr; /* Substituted OpaquePtr for “BSStoreComponent*” */
-
- /*
- ****************************************************************************
-
- ***************************************************************************
- */
- typedef SOMLargeStruct BSStoreIOIteratorData; /* Derived from a struct of 537 bytes in size */
-
- /*
- ****************************************************************************
- *****************************************************************************
- *****************************************************************************
-
- Block Storage API Functions
-
- These functions make up the Block Storage API. All functions are callable
- from the user or privileged bands. The API is split into the following
- sections:
-
- Navigation - operations to find a Store or Container and its
- relationship to other Stores and Containers
-
- Connections - operations to open and close connections with Stores and
- Containers
-
- Block Lists - operations to create and manipulate Block Lists, used
- as inputs for I/O operations
-
- I/O - operations to read and write date to Stores
-
- Accessibility - operations to change the accessibility of Store and
- Containers. Power-down and eject are handled via this interface
-
- Configuration - operations to add new devices, replace plug-ins,
- format and partition Stores and modify the relationships of
- Stores and Containers to each other.
-
- *****************************************************************************
- *****************************************************************************
- ***************************************************************************
- */
- /*
- ****************************************************************************
- *****************************************************************************
-
- Block Storage Navigation API
-
- *****************************************************************************
- ***************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreGetDeviceData - a simple iteration model to retrieve all of the
- Stores, the leaf Stores or the primary Stores.
-
- Inputs: selector - which set of Stores to retrieve
- kBSStoreGetLeafStores retrieves leaf stores
- kBSStoreGetAllStores retrieves all stores
- kBSStoreGetPrimaryStores retrieves only primary stores
- requestItemCount - the size of the buffer
-
- Outputs: iteratorData - the array of BSStoreIOIteratorData structures
- to be filled in
- totalItemCount - the actual number of items available (may be
- more than requestItemCount, though only requestItemCount
- structures will be filled in in iteratorData)
-
- Returns: E_BSSuccess if successful
-
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreIteratorCreate - Creates an iterator for Block Storage Stores which
- will be initially placed on startingStore. If starting Store is NULL
- the iterator will be placed "in the soup" at the root of the Store
- hierarchy
-
- Inputs: startingStore - the Store to begin at
-
- Outputs: newIterator - the returned iterator
-
- Returns: E_BSSuccess if successful
-
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreIteratorDispose - disposes of an iterator, freeing all resources
- associated with it
-
- Inputs: disposeIterator - the iterator to dispose
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreIteratorEnter - Moves the iterator into the child the iterator is
- currently on, placing it on the first child
-
- Inputs: iterator - the iterator to move
-
- Outputs: newStore - the Store we've just exited
-
- Returns: E_BSSuccessful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreIteratorExit - Moves the iterator into the parent the iterator is
- currently on, placing the iterator on the Store it exited.
-
- Inputs: iterator - the iterator to move
-
- Outputs: newStore - the Store we've been placed on
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreIteratorRestartChildren - Places the iterator on the first child
- in the current Store
-
- Inputs: iterator - the iterator to restart
-
- Outputs: newChild - the child we've been placed on
-
- Returns: E_BSSuccess if succesful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreIteratorRestartParent - Places the iterator on the first parent
- in the current Store
-
- Inputs: iterator - the iterator to restart
-
- Outputs: newParent - the parent we've been placed on
-
- Returns: E_BSSuccess if succesful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreIteratorNextChild - Moves the iterator to the next child
-
- Inputs: iterator - the iterator to move
-
- Outputs: newChild - the child we've been placed on
- changed - true if a parent or child has been added or deleted
- to this Store since the last BSStoreIteratorNextChild or
- BSStoreIteratorNextParent call
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreIteratorNextParent - Moves the iterator to the next parent
-
- Inputs: iterator - iterator to move
- changed - true if a parent or child has been added or deleted
- since the last BSStoreIteratorNextChild or
- BSStoreIteratorNextParent call
-
- Outputs: newParent - the parent we've been placed on
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerIteratorCreate - Creates an iterator for Block Storage Containers
- which will be initially placed on startingContainer. If starting
- Container is NULL the iterator will be placed "in the soup" at the root
- of the Container hierarchy.
-
- Inputs: startingContainer - the container to start at or NULL to start
- at the root of the Container hierarchy
-
- Outputs: newIterator - the created iterator
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerIteratorDispose - disposes of an iterator, freeing all resources
- associated with it
-
- Inputs: disposeIterator - the iterator to dispose
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerIteratorEnter - Moves the iterator into the child the iterator is
- currently on, placing it on the first child
-
- Inputs: iterator - the iterator to move
-
- Outputs: newContainer - the Container we've been placed on
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerIteratorExit - exits to the parent of the current Container,
- placing the iterator on the Container it exited. (Containers may have
- only one parent)
-
- Inputs: iterator - the iterator to move
-
- Outputs: newContainer - the Container we've just exited
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerIteratorRestartChildren - Places the iterator on the first child
- in the current Container
-
- Inputs: iterator - the iterator to restart
-
- Outputs: newChild - the child we've been placed on
-
- Returns: E_BSSuccess if succesful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerIteratorNextChild - Moves the iterator to the next child
-
- Inputs: iterator - the iterator to move
-
- Outputs: newChild - the child we've been placed on
- changed - true if a child has been added or deleted to this
- Container since the last BSContainerIteratorNextChild.
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreFindByID - finds a Store by its identifier and returns a ref
-
- Inputs: storeID - the Store ID to find
-
- Outputs: foundStore - the found reference
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreGetPropertySize - retrieves the size of the named property from the
- Store.
-
- Inputs: store - the Store to retrieve the property from
- propertyName - the name of the property to retrieve the size of
- propertyInstance - the instance of the property within this Store
-
- Outputs: propertySize - filled in with the size of the property
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreGetProperty - retrieves the named property from the Store.
-
- Inputs: store - the Store to retrieve the property from
- propertyName - the name of the property to retrieve the size of
- propertyInstance - the instance of the property within this Store
- propertySize - the size of the buffer passed in (on input)
-
- Outputs: propertyValue - a pointer to the buffer to be filled in
- propertySize - the size filled in (on exit)
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerGetPropertySize - retrieves the size of the named property from
- the Container.
-
- Inputs: container - the Container to retrieve the property from
- propertyName - the name of the property to retrieve the size of
- propertyInstance - the instance of the property within this Store
-
- Outputs: propertySize - filled in with the size of the property
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerGetProperty - retrieves the named property from the Container.
-
- Inputs: container - the Container to retrieve the property from
- propertyName - the name of the property to retrieve the size of
- propertyInstance - the instance of the property within this
- Container
- propertySize - the size of the buffer passed in (on input)
-
- Outputs: propertyValue - a pointer to the buffer to be filled in
- propertySize - the size filled in (on exit)
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ****************************************************************************
- *****************************************************************************
-
- Block Storage Connection Operations
-
- *****************************************************************************
- ***************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreOpen - Opens a Connection to a Store
-
- Inputs: store - the Store to be opened
- options - options to the connection
-
- Outputs: newConnection - the created connection if successful
-
- Returns: E_BSSuccess on success
- E_BSOutOfResources if resources for the connection cannot be allocated
- E_BSStoreInUse if the Store has an exclusive connection or if an
- exclusive connection was requested to a Store with any connections
- open.
- E_BSStoreWriteProtected if Write access was requested to a read only
- Store
- E_BSStoreNotFound if store did not match any existing Stores
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnClose - closes a Connection to a Store
-
- Inputs: connection - the connection to be closed
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerOpen - Opens a Connection to a Container
-
- Inputs: container - the Container to be opened
- options - options to the connection
-
- Outputs: newConnection - the created connection if successful
-
- Returns: E_BSSuccess on success
- E_BSOutOfResources if resources for the connection cannot be allocated
- E_BSContainerInUse if the Container has an exclusive connection or if an
- exclusive connection was requested to a Container with any connections
- open.
- E_BSContainerNotFound if container did not match any existing Containers
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerConnClose - closes a Connection to a Container
-
- Inputs: connection - the connection to be closed
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
-
- *****************************************************************************
- */
- /*
- ****************************************************************************
- *****************************************************************************
-
- Block Storage Block List Operations
-
- *****************************************************************************
- ***************************************************************************
- */
- /*
- ******************************************************************************
-
- BSBlockListCreate - Creates a block list for use with Block Storage
-
- Inputs: numAnticipatedRange - the number of ranges expected
-
- Outputs: newList - the new list to which ranges may be added
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSBlockListAddRange - Appends a new range to an existing block list
-
- Inputs: appendList - the list to add the new range to
- startingOffset - the offset, in bytes on the device of the
- start of the range
- length - the length, in bytes, of the range
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSBlockListFinalize - creates a descriptor to be used in a Block Storage
- read or write call from the memory list. After this call has been made
- no more ranges may be added to the list.
-
- Inputs: finalizeList - the list to be finalized
-
- Outputs: newDescriptor - the descriptor, to be used in a read/write call
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSBlockListDelete - Removes a Block List. All resources
- associated with this Block List are relinquished. This includes memory
- which was prepared for any of its descriptors. All descriptors are
- invalidated. This call should only be used to clean-up Block Lists
- in an abort condition. In normal usage, use BSBlockListDescriptorDelete
- to remove all descriptors and free the Block List.
-
- Inputs: deleteList - the descriptor to delete
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSBlockListDescriptorDelete - Removes a Block List Descriptor. All resources
- associated with this descriptor are relinquished. This includes memory
- which was prepared for this descriptor. If this was the last descriptor
- for a BlockList the BlockList is free'd also.
-
- Inputs: deleteDescriptor - the descriptor to delete
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSBlockListDescriptorSeek - Changes the offset within the Block List descriptor
-
- Inputs: seekDescriptor - the descriptor to seek within
- whence - how to seek
- offset - where to seek
-
- Outputs: newOffset - what the current offset is now
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSBlockListGetExtent - Gets an extent at the current offset for up to the
- specified length
-
- Inputs: srcDesriptor - the descriptor to get the extent from
- requestedLen - how long an extent to try to get
-
- Outputs: startingByte - the starting byte address in the device of the
- extent
- extentLen - how long an extent within the descriptor was found
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSBlockListAddSimpleDescriptor - adds a new descriptor to a block list. The
- new descriptor begins at the current offset of the srcDescriptor. The
- offset of the srcDescriptor is updated to point at the first byte after
- the end of the new descriptor.
-
- Inputs: srcDescriptor - the descriptor to base the new descriptor upon
- length - how much the new descriptor should cover
- bias - the bias offset to be applied to the block address of
- srcDescriptor. When addresses are retrieve from newDescriptor
- bias will be added.
-
- Outputs: newDescriptor - the new descriptor
-
- Returns: E_BSSucess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSBlockListDescriptorGetInfo - returns information about the specified
- descriptor
-
- Inputs: infoDescriptor - the descriptor to get information about
-
- Outputs: info - the information
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSBlockListDescriptorCheckBlockSizes - checks the extents specified by the
- descriptor and ensures that all start at 0 mod blockSize and are
- 0 mod blockSize in length.
-
- Inputs: checkDescriptor - the descriptor to check
- blockSize - the block size to check for
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
- E_BSBlockListBadBlockSize if any extents are mis-aligned
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSBlockListDescriptorCheckBounds - checks the extents specified by the
- descriptor and ensures that none specify addresses beyond bound
-
- Inputs: checkDescriptor - the descriptor to check
- bound - the highest allowable address
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
- E_BSBlockListBadBlockSize if any extents are mis-aligned
-
- *****************************************************************************
- */
- /*
- ****************************************************************************
- *****************************************************************************
-
- Block Storage I/O Operations
-
- *****************************************************************************
- ***************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnRead - reads data from the Store indicated by the Connection.
- This is the simple version of the call, taking only a single range
-
- Inputs: readConnection - the connection to the Store to be read from
- startingOffset - the 64-bit offset into the device to start the
- read at
- bytesToRead - the 32-bit, unsigned, number of bytes to read
-
- Outputs: buffer - filled in with the bytes read
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- E_BSMPIOutOfStoreBounds if the request exceeds the boundaries of
- the Store
- E_BSMPIUnitNotResponding if the device does not respond
- E_BSMPITransferError if some error was detected during the transfer
- E_BSMPIMemoryAccessFault if the destination memory was not accessible
- E_BSMPIOutOfResources if a necessary resource (usually memory) could
- not be allocated
- E_BSMPIMediaRemoved if the media was removed
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnWrite - writes data to the Store a Connection indicates. This is
- the simple version of the call taking only a single range.
-
- Inputs: writeConnection - the connection to the Store to be read from
- srcMem - where the data is to be taken from
- destBlocks - the blocks on the Store where the data is to be placed
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- E_BSMPIOutOfStoreBounds if the request exceeds the boundaries of
- the Store
- E_BSMPIUnitNotResponding if the device does not respond
- E_BSMPITransferError if some error was detected during the transfer
- E_BSMPIMemoryAccessFault if the destination memory was not accessible
- E_BSMPIOutOfResources if a necessary resource (usually memory) could
- not be allocated
- E_BSMPIMediaRemoved if the media was removed
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnReadSG - reads data from the Store indicated by the Connection.
- This is the scatter/gather version of the call. The Block List is
- generated by the calls above, the Memory List calls can be found in
- <MemoryLists.h>.
-
- Inputs: readConnection - the connection to the Store to be read from
- srcBlocks - a descriptor indicating the ranges on the device
- to be read
- destMemory - a Memory List descriptor indicating where the
- data is to be placed
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- E_BSMPIOutOfStoreBounds if the request exceeds the boundaries of
- the Store
- E_BSMPIUnitNotResponding if the device does not respond
- E_BSMPITransferError if some error was detected during the transfer
- E_BSMPIMemoryAccessFault if the destination memory was not accessible
- E_BSMPIOutOfResources if a necessary resource (usually memory) could
- not be allocated
- E_BSMPIMediaRemoved if the media was removed
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnWriteSG - writes data to the Store a Connection indicates. This
- is the scatter/gather version of the call. The Block List is
- generated by the calls above, the Memory List calls can be found in
- <MemoryLists.h>.
-
- Inputs: writeConnection - the connection to the Store to be read from
- srcMem - where the data is to be taken from
- destBlocks - the blocks on the Store where the data is to be placed
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- E_BSMPIOutOfStoreBounds if the request exceeds the boundaries of
- the Store
- E_BSMPIUnitNotResponding if the device does not respond
- E_BSMPITransferError if some error was detected during the transfer
- E_BSMPIMemoryAccessFault if the destination memory was not accessible
- E_BSMPIOutOfResources if a necessary resource (usually memory) could
- not be allocated
- E_BSMPIMediaRemoved if the media was removed
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnReadAsync - reads data from the Store indicated by the Connection.
- This is the asynchronous version of the simple call, taking only a
- single range.
-
- Inputs: readConnection - the connection to the Store to be read from
- startingOffset - the 64-bit offset into the device to start the
- read at
- bytesToRead - the 32-bit, unsigned, number of bytes to read
- notification - how the calling app wishes to be notified
-
- Outputs: buffer - filled in with the bytes read
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- E_BSMPIOutOfStoreBounds if the request exceeds the boundaries of
- the Store
- E_BSMPIUnitNotResponding if the device does not respond
- E_BSMPITransferError if some error was detected during the transfer
- E_BSMPIMemoryAccessFault if the destination memory was not accessible
- E_BSMPIOutOfResources if a necessary resource (usually memory) could
- not be allocated
- E_BSMPIMediaRemoved if the media was removed
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnWriteAsync - writes data to the Store a Connection indicates.
- This is the asynchronous version of the simple call, taking only a
- single range.
-
- Inputs: writeConnection - the connection to the Store to be read from
- srcMem - where the data is to be taken from
- destBlocks - the blocks on the Store where the data is to be placed
- notification - how the caller wishes to be notified
-
- Outputs: bytesWritten - the number of bytes written
- (srcMem must remain a valid memory area until
- notification of completion is received)
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- E_BSMPIOutOfStoreBounds if the request exceeds the boundaries of
- the Store
- E_BSMPIUnitNotResponding if the device does not respond
- E_BSMPITransferError if some error was detected during the transfer
- E_BSMPIMemoryAccessFault if the destination memory was not accessible
- E_BSMPIOutOfResources if a necessary resource (usually memory) could
- not be allocated
- E_BSMPIMediaRemoved if the media was removed
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnReadSGAsync - reads data from the Store indicated by the Connection.
- This is the asynchronous version of the scatter/gather call.
- The Block List is generated by the calls above, the Memory List calls
- can be found in <MemoryLists.h>.
-
- Inputs: readConnection - the connection to the Store to be read from
- srcBlocks - a descriptor indicating the ranges on the device
- to be read
- destMemory - a Memory List descriptor indicating where the
- data is to be placed
- notification - how the caller wishes to be notified
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- E_BSMPIOutOfStoreBounds if the request exceeds the boundaries of
- the Store
- E_BSMPIUnitNotResponding if the device does not respond
- E_BSMPITransferError if some error was detected during the transfer
- E_BSMPIMemoryAccessFault if the destination memory was not accessible
- E_BSMPIOutOfResources if a necessary resource (usually memory) could
- not be allocated
- E_BSMPIMediaRemoved if the media was removed
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnWriteSGAsync - writes data to the Store a Connection indicates.
- This is the asynchronous version of the scatter/gather call. The
- Block List is generated by the calls above, the Memory List calls can
- be found in <MemoryLists.h>.
-
- Inputs: writeConnection - the connection to the Store to be read from
- srcMem - where the data is to be taken from
- (the memory areas indicated by srcMem must remain valid until
- notification is received)
- destBlocks - the blocks on the Store where the data is to be placed
- notification - how the caller wishes to be notified of completion
-
- Outputs: <none>
-
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- E_BSMPIOutOfStoreBounds if the request exceeds the boundaries of
- the Store
- E_BSMPIUnitNotResponding if the device does not respond
- E_BSMPITransferError if some error was detected during the transfer
- E_BSMPIMemoryAccessFault if the destination memory was not accessible
- E_BSMPIOutOfResources if a necessary resource (usually memory) could
- not be allocated
- E_BSMPIMediaRemoved if the media was removed
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnFlush - Flushes caches for this Store and any Stores this Store
- is derived from.
-
- Inputs: flushConnection - the connection to the Store to be flushed
-
- Outputs: <none>
-
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- E_BSMPIUnitNotResponding if the device does not respond
- E_BSMPITransferError if some error was detected during the transfer
- E_BSMPIMemoryAccessFault if the destination memory was not accessible
- E_BSMPIOutOfResources if a necessary resource (usually memory) could
- not be allocated
- E_BSMPIMediaRemoved if the media was removed
-
- *****************************************************************************
- */
- /*
- ****************************************************************************
- *****************************************************************************
-
- Block Storage Accessibility Operations
-
- *****************************************************************************
- ***************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnGoToAccessibilityState - requests that a Store change its
- accessibility state to the one desired
-
- Inputs: connection - connection to the Store to change state
- newState - the desired state
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerConnGoToAccessibilityState - requests that a Container change
- its accessibility state to the one desired
-
- Inputs: connection - connection to the Container to change state
- newState - the desired state
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ****************************************************************************
- *****************************************************************************
-
- Block Storage Configuration
-
- *****************************************************************************
- ***************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnGetInfo - gets information about the Store a Connection indicates
-
- Inputs: infoConnection - the connection to the Store we want info about
-
- Outputs: infoBuffer - the information about the Store
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreCreate - creates a new Store. The Store is not added into the Block
- Storage Name Store hierarchy.
-
- Inputs: <none>
-
- Outputs: newStore - the ID of the new Store
- newStoreConnection - a connection to the created Store
-
- Returns: E_BSSuccess on success
- E_BSENoMoreStores if no more Stores can be allocated
- E_BSOutOfResources if other resources cannot be allocated
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnDeleteAndClose - deletes the Store the current connection
- references and closes the connection
-
- Inputs: connection - the connection to the Store to be deleted
-
- Outputs: <none>
- Returns: E_BSSuccess on success
- E_BSStoreInUse if other connections are open to the Store
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnSetPartitionInfo - Sets data in a partition map entry on a Store
-
- Inputs: storeConnection - the connection to the Store
- partitionNum - the partition map entry to be set
- partitionInfo - a pointer to the new partition map entry info
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- E_BSPPINoPlugIn if the Store does not have a Partitioning Plug-in
- E_BSPPIOverlappingPartition if the requested partition overlaps
- another
- E_BSPPIOutOfStoreBounds if the request partition exceeds the limits
- of the Store
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnSetPartitionInfo - Gets data in a partition map entry on a Store
-
- Inputs: storeConnection - the connection to the Store
- partitionNum - the partition map entry to be retrieved
- partitionInfo - a pointer to the partition map entry info buffer
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- E_BSPPINoPlugIn if the Store does not have a Partitioning Plug-in
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnMapPartition - Maps a partition from a Store onto another Store
-
- Inputs: srcConnection - the connection to the source Store
- partitionNum - the partition to be mapped
- destConnection - the connection to the destination Store
- destStartingBlock - where in the destination Store the mapped
- partition should be placed
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- E_BSPPINoPlugIn if the Store does not have a Partitioning Plug-in
- E_BSPPIMappingNotSupported if the mapping is not supported by either
- Store
- E_BSPPIPartitionNonExistant if the source partition doesn't exist
- E_BSEHierarchyTooDeep if this would create too many layers in the
- hierarchy (currently limited to 8)
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnGetComponents - Gets the components of a Store.
-
- Inputs: connection - the connection to the Store
- tableSize - size of the table to be filled in
- componentInfo - a pointer to an array of BSStoreComponentInfos
- to be filled in
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnMapDevice - Maps an entire device into a Store
-
- Inputs: srcDevice - the Name Registry ID of the device
- destConnection - the connection to the destination Store
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnAssociateMappingPlugin - Attaches a Mapping Plug-in to a Store
-
- Inputs: connection - the connection to the Store
- mappingPlugin - the identifier of the Plugin to be attached
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- E_BSEPlugInNotFound if the plugin specified can't be found
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnAssociatePartitioningPlugin - Attaches a Partitioning Plug-in to
- a Store
-
- Inputs: connection - the connection to the Store
- mappingPlugin - the identifier of the Plugin to be attached
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- E_BSEPlugInNotFound if the plugin specified can't be found
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnPublish - makes a Store available for general use
-
- Inputs: connection - the connection to the Store
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnUnpublish - removes a Store from general use
-
- Inputs: connection - the connection to the Store
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSStoreConnFormat - formats a Store in the specified format
-
- Inputs: connection - the connection to the Store
- formatType - the format number from possibleFormats in the
- BSStoreInfo structure
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerConnGetInfo - gets information about the Container a Connection indicates
-
- Inputs: infoConnection - the connection to the Container we want info about
-
- Outputs: infoBuffer - the information about the Container
-
- Returns: E_BSSuccess if successful
- E_BSBadConnection if the connection ID has problems
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerCreate - Creates a new Container. The Container is not added
- into the Block Storage Container Hierarchy
-
- Inputs: <none>
-
- Outputs: newContainer - a connection to the newly created Container
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerConnDeleteAndClose - deletes the Container and closes the
- connection to it. No other connections to the Container may be open.
-
- Inputs: deleteContainer - connection to the Container to be deleted
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerConnInsertContainer - inserts a Container into another Container
-
- Inputs: destContainer - a connection to the Container to insert into
- insertContainer - connection to the Container to be inserted
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerConnPublish - makes a Container available for use. Generates
- notifications as necessary
-
- Inputs: publishContainer - connection to the Container to be published
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerConnUnpublish - removes a Container from general accessibility,
- does not delete it. The Container must not have any open connections or
- published children.
-
- Inputs: unpublishContainer - the Container to unpublish
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerConnSetDevice - sets the device the Container plug-in will
- associate with. Should be called before BSContainerConnAssociatePlugIn
- for bare Containers.
-
- Inputs: connection - a connection to the Container we're associating
- the plug-in with
- deviceNode - the device the Container plug-in will interact with
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- /*
- ******************************************************************************
-
- BSContainerConnAssociatePlugIn - Associates a Container plug-in with a
- Container
-
- Inputs: connection - a connection to the Container we're associating
- the plug-in with
- plugIn - the new plug in to be associated
-
- Outputs: <none>
-
- Returns: E_BSSuccess if successful
-
- *****************************************************************************
- */
- #endif
-
- #endif /* __SOMIDL__ */
-
- #endif /* __BLOCKSTORAGE_IDL__ */
-
-